<?php

declare (strict_types=1);

namespace App\Model;

use Hyperf\Database\Model\Relations\HasOne;

/**
 * @property int $id
 * @property int $shop_id
 * @property int $is_unshared
 * @property int $min_person
 * @property int $advance_days
 * @property int $deposit_type
 * @property string $single_deposit
 * @property string $total_deposit
 * @property int $cancel_type
 * @property int $before_minute
 * @property int $status
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 * @property string $deleted_at
 * @property int $create_by
 * @property int $update_by
 * @property int $delete_by
 */
class ReservedSeatsSet extends CloudBase
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'fly_reserved_seats_set';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = ['id' => 'string', 'shop_id' => 'string', 'is_unshared' => 'integer', 'min_person' => 'integer',
        'advance_days' => 'integer', 'deposit_type' => 'integer', 'cancel_type' => 'integer',
        'before_minute' => 'integer', 'status' => 'integer',
        'created_at' => 'datetime', 'updated_at' => 'datetime', 'create_by' => 'string', 'update_by' => 'string', 'delete_by' => 'string', 'open_time' => 'array'];

    /**
     * 获取店铺信息
     * @return HasOne
     */
    public function with_shop_info()
    {
        return $this->hasOne(FlyShop::class, 'id', 'shop_id');
    }
}